package org.hibernate.orm.test.deleteunloaded;

import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.Id;
import jakarta.persistence.OneToOne;

@Entity
public class ParentSub {
    @Id
    private long id;
    private String data;
    @OneToOne(fetch = FetchType.LAZY)
    private Parent parent;

    public ParentSub() {
    }

    public ParentSub(long id, String data, Parent parent) {
        this.id = id;
        this.data = data;
        this.parent = parent;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public Parent getParent() {
        return parent;
    }

    public void setParent(Parent parent) {
        this.parent = parent;
    }
}
